package com.example.kotlindemo.activity

import android.content.Context
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.ArrayAdapter
import com.example.kotlindemo.R
import com.example.kotlindemo.base.BaseActivity
import kotlinx.android.synthetic.main.activity_list_view.*

class ListViewActivity : BaseActivity() {

    val data= listOf<String>("A","B","A","B","A","B","A","B","A","B","A","B")
    companion object {
        fun show(context: Context) {
            context.startActivity(Intent(context, ListViewActivity::class.java))
        }
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_list_view)
        listview.adapter=ArrayAdapter(this,android.R.layout.simple_expandable_list_item_1,data)
    }
}
